<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>01_媒体查询</title>
    <style>
      h1 {
          width: 300px;
          height: 200px;
          line-height: 200px;
          margin: 0 auto;
          background-image: linear-gradient(30deg,red,yellow,green);
          font-size:70px;
          color: white;
          text-shadow: 0 0 12px black;
      }
      /* 只有打印机打印或者预览才有 */
      @media print {
          h1 {
              background: transparent;
          }
      }
       @media screen {
          h1 {
              font-family: "翩翩体-简";
          }
           
       }
      @media all {
          h1 {
              color: red;
          }
      }
    </style>
</head>

<body>
  <div class="outer">
      <h1>
          新年快乐
      </h1>
    </div>
</body>

</html>